--[[

        equipment.lua
        exported by excel2lua.py
        from file:equipment.xlsx

--]]

local _data = {
  [1] = {id = 2,desc = '屌爆了的戒指',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '红戒',lv_max = 30,lv_id = 2,res = 'equip1',},
  [2] = {id = 3,desc = '达摩老祖后期伏魔之杖，沾染佛性对魔物有天然克制',mainAttrId = 101,subAttrId = 102,effect_id = 1,name = '伏魔杖',lv_max = 30,lv_id = 3,res = 'equip8',},
  [3] = {id = 4,desc = '这爪子有毒',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '绿爪',lv_max = 30,lv_id = 4,res = 'equip11',},
  [4] = {id = 5,desc = '这把剑有毒',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '青蛇剑',lv_max = 30,lv_id = 5,res = 'equip12',},
  [5] = {id = 6,desc = '好霸气的一把枪，暴击率大幅提升',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '霸王枪',lv_max = 30,lv_id = 6,res = 'equip13',},
  [6] = {id = 7,desc = '后人模仿射日弓所造，射程极远，伤害极大',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '仿射日弓',lv_max = 30,lv_id = 7,res = 'equip14',},
  [7] = {id = 8,desc = '有开天之势，拿之可开天可劈地',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '开天斧',lv_max = 30,lv_id = 8,res = 'equip15',},
  [8] = {id = 9,desc = '冥界鬼物，使人胆颤心惊',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '幽冥鬼爪',lv_max = 30,lv_id = 9,res = 'equip16',},
  [9] = {id = 10,desc = '取万年火妖之毛所制之扇，挥之烈焰涛涛',mainAttrId = 101,subAttrId = 102,effect_id = 2,name = '火绒扇',lv_max = 30,lv_id = 10,res = 'equip17',},
  [10] = {id = 11,desc = '女娲补天所弃之石，沾染补天石之灵气，拿之法力如泉涌，',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '灵石',lv_max = 30,lv_id = 10,res = 'equip2',},
  [11] = {id = 12,desc = '千年地精所炼之石，拿之形成天然壁障，防御力惊人',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '地黄玉',lv_max = 30,lv_id = 10,res = 'equip3',},
  [12] = {id = 13,desc = '太上老君奖励其看炉小童之物，围之精神抖擞，神采奕奕',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '红领巾',lv_max = 30,lv_id = 10,res = 'equip4',},
  [13] = {id = 14,desc = '袋里乾坤，可容纳万物',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '乾坤袋',lv_max = 30,lv_id = 10,res = 'equip5',},
  [14] = {id = 15,desc = '闪闪发光的一个宝物，总是能给人一个意想不到的效果',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '绿环镯',lv_max = 30,lv_id = 10,res = 'equip6',},
  [15] = {id = 16,desc = '好霸气的一把刀，使人摄于其威势不敢相抗',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '霸天刀',lv_max = 30,lv_id = 10,res = 'equip7',},
  [16] = {id = 17,desc = '如来证道之前所用禅杖，佛光鄙逼人，万邪退散',mainAttrId = 101,subAttrId = 102,effect_id = 0,name = '如来禅杖',lv_max = 30,lv_id = 10,res = 'equip10',},
  [17] = {id = 18,desc = '达摩老祖早期除魔所用之护手，威力惊人',mainAttrId = 101,subAttrId = 102,effect_id = 1,name = '降魔护手',lv_max = 30,lv_id = 10,res = 'equip9',},
}

local id_to_index={
   [2] = 1,
   [3] = 2,
   [4] = 3,
   [5] = 4,
   [6] = 5,
   [7] = 6,
   [8] = 7,
   [9] = 8,
   [10] = 9,
   [11] = 10,
   [12] = 11,
   [13] = 12,
   [14] = 13,
   [15] = 14,
   [16] = 15,
   [17] = 16,
   [18] = 17,
}

local equipment={}

function equipment.length() 
   return #_data 
end 

function equipment.indexOf(index) 
   return _data[index] 
end 

function equipment.get(id) 
  return equipment.indexOf(id_to_index[id])
end 

return equipment